/* ex: set tabstop=4 shiftwidth=4 expandtab: */
#ifndef _EVENT_H
#define _EVENT_H

typedef void (*timer_cb_t) (void *arg);
typedef int (*event_cb_t) (int fd, void *arg);

extern void add_event(int fd, event_cb_t cb, void *arg);
extern void remove_event(int fd);

/* timeout unit is 1/1000000 second */
extern void sched_event(u_int timeout, timer_cb_t cb, void *arg);

extern void event_init(void);

#endif
